package com.crm.system.service.returnMoney;

import com.crm.common.model.DataResponse;
import com.crm.common.model.DhPageInfo;
import com.crm.model.entity.contractManager.CustomerContract;
import com.crm.model.entity.returnMoney.BankFlowExamine;
import com.crm.model.qo.returnMoney.BankFlowExamineQO;
import com.crm.model.vo.finishOrderProduct.FinishOrderProductVO;
import com.crm.model.vo.returnMoney.BankFlowExamineVO;
import com.crm.model.vo.returnMoney.ReturnMoneyVO;

import java.util.Map;

/**
 * 流水审核
 * @Author xielinqi
 * @Date 10:13 上午 2021/11/2
 */
public interface BankFlowExamineService {

    /**
     * 流水审核分页
     * @Param pageIndex
     * @Param pageSize
     * @Param bankFlowExamineQO
     * @Author xielinqi
     * @Date 3:40 下午 2021/11/2
     */
    DhPageInfo<BankFlowExamineVO> selectPageList(Integer pageIndex, Integer pageSize, BankFlowExamineQO bankFlowExamineQO);

    /**
     * 审核
     * @Param examineId
     * @Param examineState
     * @Author xielinqi
     * @Date 4:50 下午 2021/11/2
     */
    DataResponse examine(BankFlowExamine bankFlowExamine);

    /**
     * 订单整单解除关联审核
     * @Param bankFlowExamine
     * @Param oldExamine
     * @Author xielinqi
     * @Date 5:23 下午 2021/11/9
     */
    DataResponse examineByOrder(BankFlowExamine bankFlowExamine, BankFlowExamine oldExamine);

    /**
     * 单笔流水解除关联审核
     * @Param bankFlowExamine
     * @Param oldExamine
     * @Author xielinqi
     * @Date 5:24 下午 2021/11/9
     */
    DataResponse examineByFlow(BankFlowExamine bankFlowExamine, BankFlowExamine oldExamine);

    /**
     * 充值解除关联审核
     * @Param bankFlowExamine
     * @Param oldExamine
     * @Author xielinqi
     * @Date 11:25 上午 2021/11/11
     */
    DataResponse examineByPay(BankFlowExamine bankFlowExamine, BankFlowExamine oldExamine);

    /**
     * 预回款审核
     * @Param bankFlowExamine
     * @Param oldExamine
     * @Author xielinqi
     * @Date 3:41 下午 2021/11/19
     */
    DataResponse examineForPrepareReturn(BankFlowExamine bankFlowExamine, BankFlowExamine oldExamine);

    /**
     * 设置各表状态
     * @Param productOrderId
     * @Param finishOrderProductNum
     * @Param oldFinishOrderProduct
     * @Param oldCustomerContract
     * @Author xielinqi
     * @Date 3:27 下午 2021/12/3
     */
    Map<String, String> getStatus(String productOrderId, String finishOrderProductNum, FinishOrderProductVO oldFinishOrderProduct, CustomerContract oldCustomerContract);

    /**
     * 产品分页
     * @Param pageIndex
     * @Param pageSize
     * @Param bankFlowExamineQO
     * @Author xielinqi
     * @Date 8:59 上午 2021/11/8
     */
    DhPageInfo<FinishOrderProductVO> selectProductPageList(Integer pageIndex, Integer pageSize, BankFlowExamineQO bankFlowExamineQO);

    /**
     * 产品分页
     * @Param pageIndex
     * @Param pageSize
     * @Param bankFlowExamineQO
     * @Author xielinqi
     * @Date 10:24 上午 2021/11/8
     */
    DhPageInfo<ReturnMoneyVO> selectReturnMoneyPageList(Integer pageIndex, Integer pageSize, BankFlowExamineQO bankFlowExamineQO);

    /**
     * 根据订单id解除关联
     * @Param productOrderId
     * @Author xielinqi
     * @Date 4:02 下午 2021/11/9
     */
    DataResponse relieveRelationByProductOrderId(BankFlowExamine bankFlowExamine);

    /**
     * 获取审核详情（包含订单详情、合同信息、产品信息、解除关联备注等）
     * @Param examineId
     * @Author xielinqi
     * @Date 9:57 上午 2021/12/10
     */
    Map getDetails(String examineId);
}
